home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1998 June / SGI Freeware 1998 June.iso / dist / fw_metamail.idb / usr / freeware / bin / rcvAppleSingle.z / rcvAppleSingle
Text File  |  1998-01-21  |  1KB  |  44 lines

  1. #!/bin/sh
  2. #
  3. # Very simple shellscript to support recieving Macintosh files
  4. # and store them in a UNIX filesystem used by the CAP AUFS program.
  5. #
  6. # To be able to use this script without modifications, you must
  7. # first have the CAP package installed so you can mount the
  8. # UNIX filesystem from the Macintosh. Second, you must have the
  9. # program cvt2cap (which you can find in the contrib directory
  10. # of the CAP distribution) which converts between CAP format
  11. # to AppleSingle format.
  12. #
  13. # Written by Patrik Faltstrom, paf@nada.kth.se, may 1993
  14. #
  15.  
  16. FILENAME=$1
  17.  
  18. #
  19. # If $AFPDIR environment variable is set, all Macintosh filenames
  20. # is based on that directory.
  21. #
  22. if [ "x$AFPDIR" = "x" ]; then
  23.    AFPDIR=`pwd`
  24. fi
  25.  
  26. echo -n "Please give a name for this Macintosh file: "
  27. read NAME
  28.  
  29. if [ "x$NAME" = "x" ]; then
  30.    echo "No name given, exiting"
  31.    exit 1
  32. fi
  33.  
  34. echo $NAME | grep '^/' > /dev/null
  35. if [ $? = 1 ]; then
  36.   NAME=$AFPDIR/$NAME
  37. fi
  38.  
  39. cvt2cap $FILENAME $NAME
  40. echo "Saved AppleMacintosh file as $NAME"
  41. exit 0
  42.  
  43.  
  44.